home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d19 / zlabp_11.arc / GIFT40B.ARC / PROUT1.BAT < prev    next >
DOS Batch File  |  1991-10-29  |  2KB  |  89 lines

  1. @echo off
  2. rem -- process a single upload file - for ProDOOR 3.4
  3. rem -- %1-logfile, %2-testfile, %3-comport
  4.  
  5. rem -- determing file type and branch to proper test case
  6. testfile %2 arc zip pak lzh zoo gif ani
  7. if errorlevel == 98 goto end
  8. if errorlevel == 7 goto ani
  9. if errorlevel == 6 goto gif
  10. if errorlevel == 5 goto zoo
  11. if errorlevel == 4 goto lzh
  12. if errorlevel == 3 goto pak
  13. if errorlevel == 2 goto zip
  14. if errorlevel == 1 goto arc
  15. goto end
  16.  
  17. :ani
  18. proecho %3 ~The Bard's Lair does not accept .ANI files in uncompressed
  19. proecho %3 ~format.  Executing PKZIP....
  20. pkzip J:\play1\%@name[%2] %2 -m
  21. proecho %3 ~~
  22. goto end
  23.  
  24. rem -- Check GIF, trim off extra bytes if found, delete if invalid or
  25. rem -- incomplete GIF file.
  26. :gif
  27. call testgif.bat
  28. goto end
  29.  
  30. rem -- test ARC files -- first convert them to ZIP files
  31. :arc
  32. proecho %3 ~~Converting ARC file %2 to ZIP format.  Please wait...~
  33. chkpath tozip %0 >>%1
  34. if errorlevel 1 goto end
  35. tozip %2 >>%1
  36.  
  37. rem -- dsz's $door.log is no longer valid after conversion, delete it.
  38. if exist %DSZLOG% del %DSZLOG%
  39. goto zip
  40.  
  41.  
  42. rem -- test ZIP files
  43. :zip
  44. ptest %2 ptest.cfg
  45. proecho %3 ~~ChkAv 2.2 - Courtesy of The Bard's Lair (718)381-3651~
  46. proecho %3 ~Checking for -AV~
  47. chkav %2
  48. if errorlevel == 2 av
  49. goto end
  50.  
  51. rem -- Found AV
  52. :av
  53. proecho %3 ~~Found -AV in file, sending mail to SysOp to revue file... ~
  54. echo User has uploaded the file: > mail
  55. echo %2 >> mail
  56. echo which contains an -AV in it, please revue file. >> mail
  57. txt2msg f:\pro\main\msgs -tSYSOP -fPROUTEST -sAV_File mail
  58. del mail
  59. goto end
  60.  
  61. rem -- test ZOO files
  62. :zoo
  63. chkpath zoo %0 >>%1
  64. if errorlevel 1 goto end
  65. zoo -test >>%1 %2
  66. if errorlevel 1 echo %2 has errors! >>%1
  67. goto end
  68.  
  69. rem -- test LZH files
  70. :lzh
  71. chkpath lharc %0 >>%1
  72. if errorlevel 1 goto end
  73. rem lharc 1.12 or later required for test function to work
  74. lharc t /v >>%1 %2
  75. if errorlevel 1 echo %2 has errors! >>%1
  76. goto end
  77.  
  78. rem -- test PAK files
  79. :pak
  80. chkpath pak %0 >>%1
  81. if errorlevel 1 goto end
  82. pak t >>%1 %2
  83. if errorlevel 1 echo %2 has errors! >>%1
  84. goto end
  85.  
  86.  
  87. :end
  88. descplay %2 >> desc
  89.